Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Add field to NooBaa's CR to override environment variables of pods #1510

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

NoOverflow
Copy link

@NoOverflow NoOverflow commented Jan 20, 2025

Explain the changes

This is a proposal to add a envVariablesOverride field to NooBaa's CR in order to customize some environment variables for all NooBaa's pods (right now only "core" sts and "endpoint" deploy pods have been tested and work)

This would allow for example overriding CONFIG_JS_ variables without having to rebuild a custom image on each release.

Currently, the new CR is defined like so, but happy to use another format if you have a better idea:

spec:
  autoscaler: {}
  bucketLogging: {}
  bucketNotifications:
    enabled: false
  cleanupPolicy: {}
  dbImage: quay.io/sclorg/postgresql-15-c9s
  dbType: postgres
  envVariablesOverride:
    core:
    - name: CONFIG_JS_WORM_ENABLED
      value: "true"
    endpoint:
    - name: [...]
      value: [...]
  image: noobaa/noobaa-core:master-20240520
  loadBalancerSourceSubnets: {}
  security:
    kms: {}

Right now, all env variables containers of a single pod are overriden (it is not on a per-container basis).
Variables defined in envVariablesOverride have priority over all variables set by the operator in case of a conflict.

Issues:

  1. Fixes How can I add custom environment variables to noobaa-core deployment through noobaa operator ? #1486

Testing Instructions:

  1. Create a NooBaa object with the envVariablesOverride field set
  2. Confirm each pod mentioned has its environment variables modified
  • Added override for all pods
  • Test for special cases (variable conflict)
  • Doc added/updated
  • Tests added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How can I add custom environment variables to noobaa-core deployment through noobaa operator ?
1 participant